package com.ll.daipao.common;

import com.ll.daipao.handler.UrlInterceptorHandler;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.IOException;
import java.util.List;

/**
 * Created by ll on 2017/11/27.
 */
public class CommonFiles {
    private static Logger logger = LoggerFactory.getLogger(UrlInterceptorHandler.class);
    public static List igurls=null;

    public static List<String> ignoredUrls(){
        if(igurls==null){
            try {
                igurls= FileUtils.readLines(new File(UrlInterceptorHandler.class.getClassLoader().getResource("ignoredUrls.txt").getFile()),"utf-8");
            } catch (IOException e) {
                logger.error(e.getMessage(),e);
            }
            return igurls;
        }else {
            return igurls;
        }
    }


}
